home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)tm.d64
/
adbk delete.c
(
.txt
)
next >
Wrap
Commodore BASIC
|
2007-02-04
|
6KB
|
187 lines
10 IFREPEAT=.THENRE=1:GOTO5000
11 PRINTCHR$(142)
15 PRINTVTAB$(23)TAB(7)"PRESS SPACE TO CONTINUE
20 [141]500
30 [141]2300
40 [153]:[153]" DO YOU WISH TO REPEAT PROGRAM? (Y/N)";
50 [141]100
60 [139]C$[178]"Y"[137]30
70 [153]"LOAD"
80 [137]3910
100 [161]C$:[139]C$[179][177]""[167]100
110 [161]C$:[139]C$[178]""[167]110
120 [142]
150 [139][194](52)[171][194](50)[179]1[167][153]:[153]"DELAY COMING FOR MEMORY CLEANUP":[153]
160 [142]
200 [132]15,A,B$,C,D
210 [139](A[179]20)[176](A[178]50)[176](A[178]62)[167][142]
230 [137]3900
450 Z[178][181](W[173]256):Y[178]W[171](Z[172]256):[141]150
460 [152]15,"P"[199](104)[199](Y)[199](Z)[199](1)
470 [132]8,FI$(1),FI$(2),FI$(3),FI$(4),FI$(5),FI$(6),FI$(7),FI$(8),FI$(9)
480 [141]200:[139]X[178]70[167]X[178].:[137]460
490 [142]
500 [153]VTAB$(23)[163]7)"PRESS 1 FOR BULK DELETE"
510 [153]VTAB$(24)[163]7)"PRESS 2 FOR RECORD TEST";
520 [141]100
530 [139]C$[178]"1"[167][142]
540 [139]C$[179][177]"2"[137]520
550 [141]5500
560 [128]
2300 [153]"LOAD * ADDRESS LIST DELETION OPTIONS * "
2310 [153]:[153]"DELETE NAMES STARTING FROM: (LETTER)":[153]
2320 [153]"DO NOT DELETE NAMES AFTER: (LETTER)":[153]
2330 [153]"OPENDELETE ALL NAMES WITH THESE CODES:"
2340 [153]:[153]"DELETE ALL NAMES WITHOUT THESE CODES:"
2350 [153]:[153]"DELETE ALL NAMES WITH THIS ZIP CODE:"
2360 [153]"(ALL OR ONLY FIRST PART)"
2370 [153]:[153]"DO NOT DELETE NAMES WITH THIS ZIP CODE:"
2380 [153]"(ALL OR ONLY FIRST PART)"
2390 [153]:[153]"MAIL CODE AND ZIP CODE OPTIONS ARE ONLY
2395 PRINT"AVAILABLE IF ALPHABET DELETION NOT USED.";
2400 OPEN1,0
2405 PRINTVTAB$(4)"[151]"
2407 INPUT#1,P1$:IFPEEK(214)<>4GOTO2405
2410 P1$=LEFT$(P1$,1):IFP1$=""GOTO2430
2415 PRINTVTAB$(5)
2420 PRINTVTAB$(6)
2422 INPUT#1,P2$:IFPEEK(214)<>6GOTO2420
2425 P2$=LEFT$(P2$,1):IFP2$=""THENP2$="?"
2427 PRINTVTAB$(7)P2$:GOTO2475
2430 PRINTVTAB$(8)
2435 INPUT#1,PY$:IFPEEK(214)<>8GOTO2430
2440 PRINTVTAB$(10)
2445 INPUT#1,PN$:IFPEEK(214)<>10GOTO2440
2450 PRINTVTAB$(13)
2455 INPUT#1,ZY$:IFPEEK(214)<>13GOTO2450
2460 PRINTVTAB$(16)
2465 INPUT#1,ZN$:IFPEEK(214)<>16GOTO2460
2475 PRINTVTAB$(21)" PRESS F7[146] TO CORRECT ENTRIES "
2476 PRINT" PRESS SPACE TO BEGIN DELETION"
2477 PRINT" ANY OTHER KEY WILL EXIT PROGRAM
2480 [160]1
2485 [141]100:[139]C$[178]"LET"[167][153]VTAB$(21)CL$CL$:[137]2400
2490 [139]C$[179][177]" "[167][142]
2495 [139]P1$[178]""[137]2510
2500 [129]HO[178]1[164]NUMBER:[139][198](P1$)[178][179][198](IN$(HO))[137]2504
2502 [130]:[153]VTAB$(20)" NO ENTRIES IN THAT RANGE.":[142]
2504 X[178][198](P2$):[129]HOLD[178]HO[164]NU:[139][198](IN$(HO))[177]X[167]HO[178]NU:[130]:[137]2645
2506 IN$(HO)[178]"^"[170][201](IN$(HO),3)
2508 [130]:[137]2645
2510 [129]HOLD[178]1[164]NU:Z[178][195](IN$(HO))[171]3
2520 [129]X[178]1[164]Z:[139][202](IN$(HO),X,1)[178]"IF"[137]2524
2522 [130]:[130]HOLD:[137]2645
2524 X[178]X[170]1:[129]Y[178]X[164]Z:[139][202](IN$(HO),Y,1)[178]"RESTORE"[137]2528
2526 [130]
2528 FI$(6)[178][202](IN$(HO),X,Y[171]1):FI$(8)[178][202](IN$(HO),Y[170]1,Z)
2535 [139]P1[137]2600
2540 [139]ZN$[179][177]""[167][139]ZN$[178][200](FI$(6),[195](ZN$))[137]2620
2545 [139]ZY$[179][177][200](FI$(6),[195](ZY$))[137]2620
2550 [139]PY$[178]""[137]2575
2555 [139]FI$(8)[178]"?"[137]2620
2560 [129]X[178]1[164][195](PY$):[129]Y[178]1[164][195](FI$(8))
2565 [139][202](PY$,X,1)[178][202](FI$(8),Y,1)[137]2575
2570 [130]:[130]:[137]2620
2575 [139]PN$[178]""[176]FI$(8)[178]"?"[137]2600
2580 [129]X[178]1[164][195](PN$):[129]Y[178]1[164][195](FI$(8))
2585 [139][202](PN$,X,1)[178][202](FI$(8),Y,1)[137]2620
2590 [130]:[130]
2600 IN$(HO)[178]"^"[170][201](IN$(HO),3)
2620 [130]HOLD
2640 [153]VTAB$(20)" NO FURTHER ENTRIES. "
2645 [137]3500
3500 [153]"LOAD"VTAB$(8)[163]2)"SORTINGCLOSEAND SAVING - PLEASE WAIT..."
3510 [158]49346,NU,IN$(1):[143] ULTRASORT
3520 Y[178]0:[129] X[178]NU[164]1[169][171]1:[139][195](IN$(X))[178]4[167]Y[178]Y[170]1:[130]
3525 [139]X[177].[167]X[178].:[130]
3530 [153]VTAB$(12)[163]10)"THERE ARE"NU[171]Y"RECORDS"
3550 [159]2,8,2,"@0:CLOSEINDEX,S,W"
3560 [141]200:[152]2,NUMBER:[141]200
3570 [129]X[178]1[164]NUMBER:[152]2,INDEX$(X):[130]:[141]200
3580 [160]2:[141]200
3600 [153]""VTAB$(20)[163]13)"PLEASE PROCEED":[142]
3900 [139][194](50150)[178]96[167]C[178][171]1
3910 [158]65511:[139]C[179][177][171]1[167][128]
3920 [153]"LOAD"VTAB$(10)A," "B$:[153]
3930 [153]" DO YOU HAVE NEW ENTRIES TO SAVE?":[153]
3940 [153]" IF SO, CORRECT DISK ERROR THEN PRESS":[153]
3950 [153][163]15)"SPACE BAR
3960 GOSUB100
3970 IFC$<>" "THENC=.:GOTO3910
3980 OPEN15,8,15:GOSUB3500:C=.:GOTO3910
5000 PRINT"[147]"CHR$(142):POKE53280,3:POKE53281,1
5005 DIM VTAB$(25):VT$(1)="":FORX=2TO25:VT$(X)=VT$(X-1)+"":NEXT
5010 DIM INDEX$(720)
5015 CL$=" "
5020 PRINT" * ADDRESS LIST DELETION PROGRAM *
5025 [153]:[153]" THIS PROGRAM WILL RAPIDLY DELETE
5030 PRINT" NAMES FROM THE 'ADDRESS LIST' PGM.
5035 [153]" IT WILL DELETE AN ALPHABETIC RANGE
5040 PRINT" OR IT WILL DELETE NAMES BY MAILING
5045 [153]" CODE AND ZIP CODE.
5050 PRINT:PRINT" IT IS POSSIBLE TO RETRIEVE DELETED
5055 [153]" NAMES USING THE ^ SEARCH FUNCTION
5060 PRINT" OF THE MAIN PROGRAM TO DISPLAY THE
5065 [153]" NAMES AND THE F7 KEY TO REENTER
5070 PRINT" THEM, BUT IT IS SUGGESTED YOU USE
5075 [153]" A COPY OF THE ORIGINAL FILES WITH
5080 PRINT" THIS DELETION PROGRAM.
5100 [153]:[153]" THIS PROGRAM WILL ALSO TEST FOR AND
5105 PRINT" DELETE 'POISONED' RECORDS THAT ARE
5110 [153]" INCORRECTLY STORED OR OTHERWISE
5115 PRINT" DAMAGED AND HALT PROGRAM WHEN CALLED.
5120 CL$[178]" "
5195 [153]:[153]VTAB$(23)[163]11)"PLEASE WAIT...";
5200 [159]15,8,15,"I"
5210 [159]2,8,2,"0:CLOSEINDEX,S,R":[141]200
5220 [139]A[179][177]62[137]5250
5230 [160]2:NUMBER[178].:[137]10000:[143] WRONG DISK
5250 [132]2,NUMBER
5260 [129]X[178]1[164]NUMBER:[139]ST[137]5280
5270 [132]2,INDEX$(X):[130]
5280 [160]2
5300 [139][194](50150)[179][177]96[167][147]"CLOSE(ML)/NOTES/SORT",8,1
5310 [137]11
5500 [153]"LOAD *POISONED RECORD DELETION PROGRAM*
5510 PRINT:PRINT" THE PROGRAM TESTS EACH RECORD IN
5520 [153]" ORDER. IT WILL DISPLAY THE NAME
5530 PRINT" CURRENTLY BEING TESTED.
5535 [153]:[153]" IF IT FINDS A BAD RECORD AND ENDS
5540 PRINT" THE PROGRAM WITH A RETURN TO
5550 [153]" 'READY', ENTER 'GOTO 6000' AND
5560 PRINT" PRESS THE RETURN[146] KEY. THE
5565 [153]" RECORD CURRENTLY BEING TESTED
5570 PRINT" WILL BE DELETED.
5580 [153]:[153]" IF THE PROGRAM JUST HANGS UP
5590 PRINT" RATHER THAN ENDING, PRESS THE
5600 [153]" RUN/STOPWAIT AND RESTOREWAIT KEYS
5610 PRINT" TOGETHER AND THEN PROCEED WITH
5620 [153]" 'GOTO 6000'.
5650 PRINTVTAB$(23)TAB(7)"PRESS SPACE TO CONTINUE
5660 [141]100
5670 [153]"LOAD"
5900 [159]8,8,8,"0:CLOSEFILES"
5910 [129]HO[178]1[164]NU:[139][195](IN$(HO))[178]4[167][130]:[137]5970
5920 [129]X[178]1[164][195](IN$(HO)):[139][202](IN$(HO),X,1)[179][177]"IF"[167][130]
5930 [153]"TESTING #"HO" - "[200](IN$(HO),X[171]1)
5950 W[178][197]([201](IN$(HO),3)):[141]450:[141]200
5960 [130]HO
5970 [160]8
5980 [153]:[153]"TEST SEARCH COMPLETED"
5990 [142]
6000 [160]8:[139]HO[178]0[167][153]"NO RECORD TO DELETE SPECIFIED":[128]
6010 [129]X[178]1[164][195](IN$(HO)):[139][202](IN$(HO),X,1)[179][177]"IF"[167][130]
6020 [153]"LOAD"VTAB$(8)" DELETING "[200](IN$(HO),X[171]1)" - PLEASE WAIT..."
6030 IN$(HO)[178]"^"[170][201](IN$(HO),3)
6040 [141]3510
6050 [153]:[153]"DELETION COMPLETED AND SAVED TO DISK":[153]
6060 [153]"RERUN PROGRAM TO DELETE FURTHER FILES
6070 END
10000 PRINT"[147]"VTAB$(10)" PLACE THE DISK WITH THE ADDRESS LIST "
10010 PRINT" FILES IN THE DISK DRIVE BEFORE RUNNING "
10020 END
20000 ** NAME DELETION PROGRAM **
20010 ** BY FRANK VAN DEVENTER **
20020 FOR USE WITH 'ADDRESS BOOK'
20030 [VERS 12/16/84]